package cn.touna.jss.common.properties.disconf;

import com.baidu.disconf.client.common.annotations.DisconfFile;
import com.baidu.disconf.client.common.annotations.DisconfFileItem;
import org.springframework.stereotype.Component;

/**
 * 邦盛
 */
@Component
@DisconfFile(targetDirPath = "disconf", filename = "bangsun.properties")
public class BangSunProperties {
    /**
     * ip:port
     */
    private String address;
    private String appKey;
    private String appSecret;
    /**
     * 信贷风险名单
     */
    private String loanRiskUrl;

    @DisconfFileItem(name = "bangsun.address", associateField = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @DisconfFileItem(name = "bangsun.appKey", associateField = "appKey")
    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    @DisconfFileItem(name = "bangsun.appSecret", associateField = "appSecret")
    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    @DisconfFileItem(name = "bangsun.loanRiskUrl", associateField = "loanRiskUrl")
    public String getLoanRiskUrl() {
        return loanRiskUrl;
    }

    public void setLoanRiskUrl(String loanRiskUrl) {
        this.loanRiskUrl = loanRiskUrl;
    }


    @Override
    public String toString() {
        return "BangSunProperties{" +
                "address='" + address + '\'' +
                ", appKey='" + appKey + '\'' +
                ", appSecret='" + appSecret + '\'' +
                ", loanRiskUrl='" + loanRiskUrl + '\'' +
                '}';
    }
}
